package com.fen.demo015;

import com.fen.common.UserDao;
import com.fen.common.UserService;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @description:
 * @author: lrf
 * @create: 2019-03-23
 **/
@Configuration
public class UserConfig {

	@Bean
	public UserDao userDao(){
		return new UserDao();
	}

	@Bean
	public UserService userService(){
		UserService userService = new UserService();
		userService.setUserDao(userDao());
		return userService;
	}
}
